<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改牛档案')" />
	<th:block th:include="include :: select2-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ncCowsFiles-edit" th:object="${ncCowsFiles}">
            <input id="cowId" name="cowId" th:field="*{cowId}"  type="hidden">
			<div class="form-group">
				<label class="col-sm-3 control-label">耳号：</label>
				<div class="col-sm-8">
					<input id="cowCode" name="cowCode" th:field="*{cowCode}" class="form-control" type="number" >
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">出生年月：</label>

				<div class="col-sm-8">
					<input id="birthDay" data-format="yyyy-MM-dd HH:mm:ss" readonly="true" data-type="datetime" required name="birthDay" placeholder="请选择时间"
						   th:value="*{#dates.format(birthDay, 'yyyy-MM-dd HH:mm:ss')}"
						   class="form-control" type="text" th:class="time-input"  >
				</div>


				<!--<div class="col-sm-8">
					<input id="birthDay" name="birthDay" th:field="*{birthDay}" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">来源：</label>
				<div class="col-sm-8">
					<select id="comeFrom" class="form-control select2-multiple" name="comeFrom"
							th:with="type=${@dict.getType('comeFrom')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
								th:field="*{comeFrom}"></option>
					</select>
				</div>

				<!--<div class="col-sm-8">
					<input id="comeFrom" name="comeFrom" th:field="*{comeFrom}" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">入舍时间：</label>

				<div class="col-sm-8">
					<input id="inputTime" data-format="yyyy-MM-dd HH:mm:ss" readonly="true" data-type="datetime" required name="inputTime" placeholder="请选择时间"
						   th:value="*{#dates.format(inputTime, 'yyyy-MM-dd HH:mm:ss')}"
						   class="form-control" type="text" th:class="time-input"  >
				</div>

				<!--<div class="col-sm-8">
					<input id="inputTime" name="inputTime" th:field="*{inputTime}" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">入舍时体重(kg)：</label>
				<div class="col-sm-8">
					<input id="firstWeight" name="firstWeight" th:field="*{firstWeight}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">产牛胎次：</label>
				<div class="col-sm-8">
					<input id="childs" name="childs" th:field="*{childs}" class="form-control" type="number">
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">更新时间：</label>

				<div class="col-sm-8">
					<input id="updateTime" data-format="yyyy-MM-dd HH:mm:ss" readonly="true" data-type="datetime" required name="updateTime" placeholder="请选择时间"
						   th:value="*{#dates.format(updateTime, 'yyyy-MM-dd HH:mm:ss')}"
						   class="form-control" type="text" th:class="time-input"  >
				</div>

				&lt;!&ndash;<div class="col-sm-8">
					<input id="updateTime" name="updateTime" th:field="*{updateTime}" class="form-control" type="text">
				</div>&ndash;&gt;
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">淘汰时间：</label>

				<div class="col-sm-8">
					<input id="eliminateTime" data-format="yyyy-MM-dd HH:mm:ss" readonly="true" data-type="datetime" name="eliminateTime" placeholder="请选择时间"
						   th:value="*{#dates.format(eliminateTime, 'yyyy-MM-dd HH:mm:ss')}"
						   class="form-control" type="text" th:class="time-input"  >
				</div>

				<!--<div class="col-sm-8">
					<input id="eliminateTime" name="eliminateTime" th:field="*{eliminateTime}" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">淘汰原因：</label>
				<div class="col-sm-8">
					<input id="eliminateReason" name="eliminateReason" th:field="*{eliminateReason}" class="form-control" type="text">
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
				<textarea id="remark" name="remark" th:field="*{remark}" class="form-control" type="text" rows="4"> </textarea>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
	<th:block th:include="include :: select2-js"/>
    <script type="text/javascript">
		var prefix = ctx + "system/ncCowsFiles";
		$("#form-ncCowsFiles-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});

		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-ncCowsFiles-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
